#ifndef _SYSTICK_H
#define _SYSTICK_H

#define SYS_TICKDIFF(start, current)             ((current >= start) ? (u32)(current - start) : (u32)(0xFFFFFFFF - start + 1 + current))

typedef struct{
	u32 tick_num;
	const u32 tick_time;
}tick_t;

void SYSTICK_Init(void);
void Delay_ms(u32 nTime);
u32 tick_get(void);
u8  tick_istimeout(tick_t *tick);
void tick_refresh(tick_t *tick);
void Systick_callback(void);

#endif
